<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Module: _ | jPublic工具文档</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="styles/prettify-jsdoc.css">
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/tui-doc.css">

    
</head>
<body>
<nav class="lnb" id="lnb">
    <div class="logo" style="width: 30px; height: 30px">
        
            <a href="https://github.com/smltq/jPublic" rel="noopener noreferrer" target="_blank">
                <img src="favicon.ico" width="100%" height="100%">
            </a>
        
    </div>
    <div class="title">
        <h1><a href="index.html" class="link">jPublic工具文档</a></h1>
        
    </div>
    <div class="search-container" id="search-container">
        <input type="text" placeholder="Search">
        <ul></ul>
    </div>
    
    <div class="lnb-api hidden"><h3>Modules</h3><ul><li><a href="module-_.html">_</a><button type="button" class="hidden toggle-subnav btn btn-link">  <span class="glyphicon glyphicon-plus"></span></button><div class="hidden" id="module:__sub"><div class="member-type">Members</div><ul class="inner"><li><a href="module-_.html#.DEFAULT_SCALE">DEFAULT_SCALE</a></li><li><a href="module-_.html#.EPSILON">EPSILON</a></li><li><a href="module-_.html#.VERSION">VERSION</a></li></ul><div class="member-type">Methods</div><ul class="inner"><li><a href="module-_.html#.cl">cl</a></li><li><a href="module-_.html#.clone">clone</a></li><li><a href="module-_.html#.copyToClipboard">copyToClipboard</a></li><li><a href="module-_.html#.dateFormat">dateFormat</a></li><li><a href="module-_.html#.debounce">debounce</a></li><li><a href="module-_.html#.defineColor">defineColor</a></li><li><a href="module-_.html#.defineOperate">defineOperate</a></li><li><a href="module-_.html#.difference">difference</a></li><li><a href="module-_.html#.each">each</a></li><li><a href="module-_.html#.equals">equals</a></li><li><a href="module-_.html#.every">every</a></li><li><a href="module-_.html#.extend">extend</a></li><li><a href="module-_.html#.extendOwn">extendOwn</a></li><li><a href="module-_.html#.fmoney">fmoney</a></li><li><a href="module-_.html#.format">format</a></li><li><a href="module-_.html#.formatBytes">formatBytes</a></li><li><a href="module-_.html#.formatTime">formatTime</a></li><li><a href="module-_.html#.functions">functions</a></li><li><a href="module-_.html#.getFormJson">getFormJson</a></li><li><a href="module-_.html#.getRandom">getRandom</a></li><li><a href="module-_.html#.getRandomDate">getRandomDate</a></li><li><a href="module-_.html#.getRootPath">getRootPath</a></li><li><a href="module-_.html#.getUrlParam">getUrlParam</a></li><li><a href="module-_.html#.getWeekEndDate">getWeekEndDate</a></li><li><a href="module-_.html#.getWeekStartDate">getWeekStartDate</a></li><li><a href="module-_.html#.isArray">isArray</a></li><li><a href="module-_.html#.isFunction">isFunction</a></li><li><a href="module-_.html#.isMatch">isMatch</a></li><li><a href="module-_.html#.isNullOrEmpty">isNullOrEmpty</a></li><li><a href="module-_.html#.isNumeric">isNumeric</a></li><li><a href="module-_.html#.isObject">isObject</a></li><li><a href="module-_.html#.isRepeat">isRepeat</a></li><li><a href="module-_.html#.isString">isString</a></li><li><a href="module-_.html#.isValidDate">isValidDate</a></li><li><a href="module-_.html#.iteratee">iteratee</a></li><li><a href="module-_.html#.keys">keys</a></li><li><a href="module-_.html#.lastDay">lastDay</a></li><li><a href="module-_.html#.ltrim">ltrim</a></li><li><a href="module-_.html#.matcher">matcher</a></li><li><a href="module-_.html#.now">now</a></li><li><a href="module-_.html#.numAdd">numAdd</a></li><li><a href="module-_.html#.numCompare">numCompare</a></li><li><a href="module-_.html#.numDivide">numDivide</a></li><li><a href="module-_.html#.numEqual">numEqual</a></li><li><a href="module-_.html#.numMultiply">numMultiply</a></li><li><a href="module-_.html#.numSubtract">numSubtract</a></li><li><a href="module-_.html#.poll">poll</a></li><li><a href="module-_.html#.range">range</a></li><li><a href="module-_.html#.rtrim">rtrim</a></li><li><a href="module-_.html#.runOnce">runOnce</a></li><li><a href="module-_.html#.serverTime">serverTime</a></li><li><a href="module-_.html#.shortDateFormat">shortDateFormat</a></li><li><a href="module-_.html#.shuffle">shuffle</a></li><li><a href="module-_.html#.some">some</a></li><li><a href="module-_.html#.throttle">throttle</a></li><li><a href="module-_.html#.toFixed">toFixed</a></li><li><a href="module-_.html#.toFixed">toFixed</a></li><li><a href="module-_.html#.trim">trim</a></li><li><a href="module-_.html#.truncate">truncate</a></li><li><a href="module-_.html#.unformatTime">unformatTime</a></li><li><a href="module-_.html#.unique">unique</a></li></ul></div></li></ul></div>
</nav>
<div id="resizer"></div>

<div class="main" id="main">
    




<section>

<header>
    
        <h2>_</h2>
        
            
        
    
</header>

<article>
    
        <div class="container-overview">
        
            
                <div class="description">创建全局对象:_</div>
            

            
                

<dt>
    
</dt>
<dd>

    

    

    

    

    

    

    

    

    

    

    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    

</dd>

            
        
        </div>
    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        <dl>
            

<dt>
<h4 class="name" id=".DEFAULT_SCALE">
    <span class="type-signature"><span class="icon green">static</span>, <span class="icon green">readonly</span> </span>DEFAULT_SCALE<span class="type-signature"></span>
    
    <div class="container-source members">
        <code><a href="jPublic.js.html">jPublic.js</a></code>,
        <code><a href="jPublic.js.html#line1336">line 1336</a></code>
    </div>
    
</h4>


</dt>
<dd>
    
    <div class="description">
        默认数值保留小数位数
    </div>
    

    <!--
    
    -->

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    

    
</dd>

        
            

<dt>
<h4 class="name" id=".EPSILON">
    <span class="type-signature"><span class="icon green">static</span>, <span class="icon green">readonly</span> </span>EPSILON<span class="type-signature"></span>
    
    <div class="container-source members">
        <code><a href="jPublic.js.html">jPublic.js</a></code>,
        <code><a href="jPublic.js.html#line1329">line 1329</a></code>
    </div>
    
</h4>


</dt>
<dd>
    
    <div class="description">
        精度范围
    </div>
    

    <!--
    
    -->

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    

    
</dd>

        
            

<dt>
<h4 class="name" id=".VERSION">
    <span class="type-signature"><span class="icon green">static</span>, <span class="icon green">readonly</span> </span>VERSION<span class="type-signature"> :string</span>
    
    <div class="container-source members">
        <code><a href="jPublic.js.html">jPublic.js</a></code>,
        <code><a href="jPublic.js.html#line50">line 50</a></code>
    </div>
    
</h4>


</dt>
<dd>
    
    <div class="description">
        当前版本号
    </div>
    

    <!--
    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>


            </li>
        </ul>
    
    -->

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-default">Default Value:</dt>
    <dd class="tag-default"><ul class="dummy">
            <li>1.8.3</li>
        </ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        </dl>
    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
                

<dt>
    
        <h4 class="name" id=".cl">
            
                <span class="type-signature"><span class="icon green">static</span> </span>cl<span class="signature">(num, opration)</span><span class="type-signature"> &rarr; {string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1603">line 1603</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        阿拉伯数字转中文数字(源码:https://github.com/cnwhy/nzh.git)
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>num</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">阿拉伯数字/字符串 , 科学记数法字符串</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>opration</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">转换配置<br>                         {<br>                             ww: {万万化单位 | false}<br>                             tenMin: {十的口语化 | false}<br>                             nzh:{中文语言|简体}<br>                         }<br></td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>








            
    </div>
    

    


<dl class="details">

    
    <dt class="tag-version">Version:</dt>
    <dd class="tag-version"><ul class="dummy"><li>1.8.3</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.cl("100111",{tenMin:true})=> "十万零一百一十一"_.cl("100111")=> "一十万零一百一十一"_.cl("13.5",{tenMin:true})=> "十三点五"_.cl(1e16)=> "一亿亿"</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".clone">
            
                <span class="type-signature"><span class="icon green">static</span> </span>clone<span class="signature">(obj)</span><span class="type-signature"> &rarr; {*|_|*}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line974">line 974</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        创建 一个浅复制（浅拷贝）的克隆object。任何嵌套的对象或数组都通过引用拷贝，不会复制。
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">要克隆的对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">*</span>
|

<span class="param-type">_</span>
|

<span class="param-type">*</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.clone({name: 'moe'});=> {name: 'moe'};</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".copyToClipboard">
            
                <span class="type-signature"><span class="icon green">static</span> </span>copyToClipboard<span class="signature">()</span><span class="type-signature"></span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line467">line 467</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        复制文本到剪切板(适用于Chrome、Firefox、Internet Explorer和Edge，以及Safari)
    </div>
    

    

    

    

    

    

    

    

    

    

    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".dateFormat">
            
                <span class="type-signature"><span class="icon green">static</span> </span>dateFormat<span class="signature">(date, format)</span><span class="type-signature"> &rarr; {*}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1099">line 1099</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        将 Date 转化为指定格式的String 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q)<br>可以用 1-2 个占位符 年(y)可以用 1-4 个占位符 毫秒(S)只能用 1 个占位符(是 1-3 位的数字)<br>
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">日期(默认当前时间)</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>format</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">格式化字符串(默认yyyy-MM-dd hh:mm:ss)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">*</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.dateFormat(date,"yyyy-MM-dd hh:mm:ss.S") ==> 2016-05-04 08:09:04.423_.dateFormat(date,"yyyy-M-d h:m:s.S") ==>2016-05-04 8:9:4.18</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".debounce">
            
                <span class="type-signature"><span class="icon green">static</span> </span>debounce<span class="signature">(fn, wait, immediate)</span><span class="type-signature"></span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line307">line 307</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        函数去抖,空闲时间大于或等于wait，执行fn
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">要调用的函数</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>wait</code></td>
            

            <td class="type">
            
                
<span class="param-type">Integer</span>


            
            </td>

            

            

            <td class="description last">延迟时间(单位毫秒)</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>immediate</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">给immediate参数传递false绑定的函数先执行，而不是wait之后执行</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                




- 实际调用函数




            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var lazyLayout = _.debounce(calculateLayout, 300);$(window).resize(lazyLayout);</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".defineColor">
            
                <span class="type-signature"><span class="icon green">static</span> </span>defineColor<span class="signature">(value, color)</span><span class="type-signature"> &rarr; {string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line827">line 827</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        定义文字颜色
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">原始文字</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>color</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">要定义的颜色（默认红色）</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.defineColor(“Hello”)=>&lt;span style="color:#FF0000">Hello&lt;/span></code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".defineOperate">
            
                <span class="type-signature"><span class="icon green">static</span> </span>defineOperate<span class="signature">(arr, value)</span><span class="type-signature"> &rarr; {string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line501">line 501</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        定义操作列
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>arr</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">一个数组</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">Integer</span>


            
            </td>

            

            

            <td class="description last">对应行的id值</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>





- 返回html字符串




            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var arr = [     { text: "删除", fn: "detailDataGrid.Delete({0})" },     {text: "修改", fn: "detailDataGrid.Edit({0})" }]_.defineOperate(arr,3)=>&lt;a style='cursor: pointer;' onclick='detailDataGrid.Delete(3)' href='javascript:;'>删除&lt;/a> | &lt;a style='cursor: pointer;' onclick='detailDataGrid.Edit(3)' href='javascript:;'>修改&lt;/a></code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".difference">
            
                <span class="type-signature"><span class="icon green">static</span> </span>difference<span class="signature">(a, b)</span><span class="type-signature"> &rarr; {*}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1206">line 1206</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        数组差集，以第一个数组为主
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>a</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">主数组</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>b</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">次数组</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">*</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var a = [1,2,3,4,5]var b = [2,4,6,8,10]_.difference(a, b)=>[1,3,5]</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".each">
            
                <span class="type-signature"><span class="icon green">static</span> </span>each<span class="signature">(obj, iteratee, context)</span><span class="type-signature"></span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line245">line 245</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        遍历list中的所有元素，按顺序用遍历输出每个元素。<br>如果传递了context参数，则把iteratee绑定到context对象上。<br>每次调用iteratee都会传递三个参数：(element, index, list)。<br>如果list是个JavaScript对象，iteratee的参数是 (value, key, list))。<br>返回list以方便链式调用。<br>
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">遍历目标</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>iteratee</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">迭代器</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">绑定的目标对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.each([1, 2, 3], alert);=> 依次提示每个数字..._.each({one: 1, two: 2, three: 3}, alert);=> 依次提示每个数字...</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".equals">
            
                <span class="type-signature"><span class="icon green">static</span> </span>equals<span class="signature">(a, b, strict)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1307">line 1307</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        判断数组是否相等,默认为严格模式比较
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>a</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">第一个数组</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>b</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">第二个数组</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>strict</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">是否严格比较（默认为true)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var arr1 = [1, 2, 3, 4];var arr2 = [2, 1, 4, 3];var arr3 = [2, 2, 3, 4];var arr4 = [1, 2, 3, 4];_.equals(arr1,arr2);=> false_.equals(arr1,arr2, false);=>true_.equals(arr1,arr3);=>false_.equals(arr1,arr3, false);=>false_.equals(arr1,arr4);=>true_.equals(arr1,arr4, false);=>true</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".every">
            
                <span class="type-signature"><span class="icon green">static</span> </span>every<span class="signature">(list, predicate, context)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line872">line 872</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        如果list中的所有元素都通过predicate的真值检测就返回true。<br>（注：如果存在原生的every方法，就使用原生的every。）<br>predicate 通过 iteratee 进行转换，以简化速记语法。
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>list</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">要检查的列表</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>predicate</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">检测函数</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">上下文</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.every([2, 4, 5], function(num) { return num % 2 == 0; });=> false</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".extend">
            
                <span class="type-signature"><span class="icon green">static</span> </span>extend<span class="signature">(obj)</span><span class="type-signature"> &rarr; {_}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1702">line 1702</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        允许自己的实用程序函数扩展jPublic。传递一个 {name: function}定义的哈希添加到jPublic对象，以及面向对象封装。
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">_</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.extend({ abc: function(str) {     return str; }});_.abc("Hello");=>"Hello"</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".extendOwn">
            
                <span class="type-signature"><span class="icon green">static</span> </span>extendOwn<span class="signature">()</span><span class="type-signature"></span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line206">line 206</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        类似于 extend, 但只复制自己的属性覆盖到目标对象。（注：不包括继承过来的属性）。
    </div>
    

    

    

    

    

    

    

    

    

    

    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var a = {      foo: false  };var b = {      bar: true  };_.extendOwn(a,b)=>{ foo: false, bar: true };</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".fmoney">
            
                <span class="type-signature"><span class="icon green">static</span> </span>fmoney<span class="signature">(value, digit)</span><span class="type-signature"> &rarr; {string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line805">line 805</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        金额格式化
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">原始金额数值</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>digit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Integer</span>


            
            </td>

            

            

            <td class="description last">保留小数位置(默认2位)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.fmoney(100000000)=>100,000,000.00_.fmoney(100000000.3434343, 3)=>100,000,000.343</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".format">
            
                <span class="type-signature"><span class="icon green">static</span> </span>format<span class="signature">(format)</span><span class="type-signature"> &rarr; {string|void|string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line538">line 538</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        格式化字符串
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>format</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">要格式化的字符串</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        <ul>
                <li>



<span class="param-type">string</span>
|

<span class="param-type">void</span>







</li>
            
                <li>



<span class="param-type">string</span>







</li>
            </ul>
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.format("Hello, {0}!","World")=>Hello, World_.format("Hello, {0}, My {1}!","World","Love You")=>Hello, World, My Love You</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".formatBytes">
            
                <span class="type-signature"><span class="icon green">static</span> </span>formatBytes<span class="signature">(bytes, decimals)</span><span class="type-signature"> &rarr; {string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line850">line 850</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        字节格式化
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>bytes</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">字节值</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>decimals</code></td>
            

            <td class="type">
            
                
<span class="param-type">Integer</span>


            
            </td>

            

            

            <td class="description last">小数位数</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>formatBytes(1024);=>1 KBformatBytes('1024');=>1 KBformatBytes(1234);=>1.21 KBformatBytes(1234, 3);=>1.205 KB</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".formatTime">
            
                <span class="type-signature"><span class="icon green">static</span> </span>formatTime<span class="signature">(n)</span><span class="type-signature"> &rarr; {string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1152">line 1152</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        将时间格式化为指定格式的String
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>n</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">时间(单位秒)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.formatTime(25);=> '0:00:25'_.formatTime(63846);=> '17:44:06'</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".functions">
            
                <span class="type-signature"><span class="icon green">static</span> </span>functions<span class="signature">(obj)</span><span class="type-signature"> &rarr; {this}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line273">line 273</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        返回一个对象里所有的方法名, 而且是已经排序的 — 也就是说, 对象里每个方法(属性值是一个函数)的名称.
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">查找对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">this</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.functions(_);=> ["arrayDiff", "arrayEquals", "arrayIsRepeat", "clone", "debounce", "defineColor" ...</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".getFormJson">
            
                <span class="type-signature"><span class="icon green">static</span> </span>getFormJson<span class="signature">(frm)</span><span class="type-signature"></span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line454">line 454</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        获取表单数据
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>frm</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">表单对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>获得表单数据，自动拼接成json对象，提交给服务端$.ajax({    type: 'post',    url: 'your url',    data: _.getFormJson($('#formId')),    success: function(data) {      // your code    }  });</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".getRandom">
            
                <span class="type-signature"><span class="icon green">static</span> </span>getRandom<span class="signature">(min, max)</span><span class="type-signature"> &rarr; {number}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line431">line 431</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        返回一个min 和 max之间的随机整数。<br>如果你只传递一个参数，那么将返回0和这个参数之间的整数
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>min</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">随机数下限,没传默认为0</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>max</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">随机数上限</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">number</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.random(0, 100);=> 48</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".getRandomDate">
            
                <span class="type-signature"><span class="icon green">static</span> </span>getRandomDate<span class="signature">(begin, end)</span><span class="type-signature"> &rarr; {Date}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1027">line 1027</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        随机获取一个日期
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>begin</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">开始时间(默认1970-1-1)</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>end</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">结束时间(默认当前时间)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">Date</span>








            
    </div>
    

    


<dl class="details">

    
    <dt class="tag-version">Version:</dt>
    <dd class="tag-version"><ul class="dummy"><li>1.8.3</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.dateFormat(_.getRandomDate());=>2019-05-01 12:34:54</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".getRootPath">
            
                <span class="type-signature"><span class="icon green">static</span> </span>getRootPath<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line519">line 519</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        获取当前网站根路径
    </div>
    

    

    

    

    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>http://localhost:8083/tqlin</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".getUrlParam">
            
                <span class="type-signature"><span class="icon green">static</span> </span>getUrlParam<span class="signature">(name)</span><span class="type-signature"> &rarr; {string|null}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line287">line 287</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        获得当前Url参数值
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">参数名</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>
|

<span class="param-type">null</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".getWeekEndDate">
            
                <span class="type-signature"><span class="icon green">static</span> </span>getWeekEndDate<span class="signature">(date)</span><span class="type-signature"> &rarr; {Date}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1083">line 1083</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        获得本周的结束日期
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">日期(默认当前日期)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">Date</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.dateFormat(_.getWeekEndDate());=>2019-05-13 00:00:00</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".getWeekStartDate">
            
                <span class="type-signature"><span class="icon green">static</span> </span>getWeekStartDate<span class="signature">(date)</span><span class="type-signature"> &rarr; {Date}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1069">line 1069</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        获得本周的开始日期
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">日期(默认当前日期)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">Date</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.dateFormat(_.getWeekStartDate());=>2019-05-13 00:00:00</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".isArray">
            
                <span class="type-signature"><span class="icon green">static</span> </span>isArray<span class="signature">(obj)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line700">line 700</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        如果obj是一个数组，返回true。
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">要检查的对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>(function(){ return _.isArray(arguments); })();=> false_.isArray([1,2,3]);=> true</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".isFunction">
            
                <span class="type-signature"><span class="icon green">static</span> </span>isFunction<span class="signature">(obj)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line598">line 598</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        如果obj是一个函数（Function），返回true。
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">要检查的对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.isFunction(alert);=> true</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".isMatch">
            
                <span class="type-signature"><span class="icon green">static</span> </span>isMatch<span class="signature">(object, attrs)</span><span class="type-signature"></span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line218">line 218</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        判断properties中的键和值是否包含在object中。
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>object</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">查找目标</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>attrs</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">查找对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var stooge = {name: 'moe', age: 32};_.isMatch(stooge, {age: 32});=> true</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".isNullOrEmpty">
            
                <span class="type-signature"><span class="icon green">static</span> </span>isNullOrEmpty<span class="signature">(str)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line664">line 664</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        是否为空字符串
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>str</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">要检查的字符串</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.isNullOrEmpty("   ");=>true.isNullOrEmpty(' ');=>truevar student = {className: "测试班", name: "我是张三", age: 18};_.isNullOrEmpty(student.skill);=>true_.isNullOrEmpty(undefined);=>true_.isNullOrEmpty(null);=>true_.isNullOrEmpty("");=>true_.isNullOrEmpty('')=>true</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".isNumeric">
            
                <span class="type-signature"><span class="icon green">static</span> </span>isNumeric<span class="signature">(value)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line731">line 731</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        是否数值
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">要检查的对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>// true_.isNumeric( "-10" )_.isNumeric( "0" )_.isNumeric( 0xFF )_.isNumeric( "0xFF" )_.isNumeric( "8e5" )_.isNumeric( "3.1415" )_.isNumeric( +10 )_.isNumeric( 0144 )

     // false_.isNumeric( "-0x42" )_.isNumeric( "7.2acdgs" )_.isNumeric( "" )_.isNumeric( {} )_.isNumeric( NaN )_.isNumeric( null )_.isNumeric( true )_.isNumeric( Infinity )_.isNumeric( undefined )</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".isObject">
            
                <span class="type-signature"><span class="icon green">static</span> </span>isObject<span class="signature">(obj)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line613">line 613</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        如果object是一个对象，返回true。需要注意的是JavaScript数组和函数是对象，字符串和数字不是。
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">要检查的对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.isObject({});=> true_.isObject(1);=> false</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".isRepeat">
            
                <span class="type-signature"><span class="icon green">static</span> </span>isRepeat<span class="signature">(arr)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1246">line 1246</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        数组元素是否重复
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>arr</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">要检查的数组对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var a = [1, 2, 3, 4, 5];var b = [1, 2, 3, 5, 5];_.isRepeat(a);=>false_.isRepeat(b);=>true</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".isString">
            
                <span class="type-signature"><span class="icon green">static</span> </span>isString<span class="signature">(value)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line744">line 744</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        如果object是一个字符串，返回true。
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">要检查的值</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.isString("moe");=> true</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".isValidDate">
            
                <span class="type-signature"><span class="icon green">static</span> </span>isValidDate<span class="signature">(date)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line632">line 632</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        是否为日期对象，参数支持Date和String类型
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">要检查的对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    
    <dt class="tag-version">Version:</dt>
    <dd class="tag-version"><ul class="dummy"><li>1.8.3</li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.isValidDate("2019-5-5a");=>false_.isValidDate("2019-5-5");=>true_.isValidDate(new Date("2019-5-5a"));=>false</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".iteratee">
            
                <span class="type-signature"><span class="icon green">static</span> </span>iteratee<span class="signature">(value, context)</span><span class="type-signature"></span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line171">line 171</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        生成可应用于集合中的每个元素的回调。<br>_.iteratee支持许多常见回调用例的简写语法。<br>根据值的类型，_.iteratee 各种结果
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">迭代值</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">上下文</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>// 空值_.iteratee();=> _.identity()// 函数_.iteratee(function(n) { return n * 2; });=> function(n) { return n * 2; }// 对象_.iteratee({firstName: 'Chelsea'});=> _.matcher({firstName: 'Chelsea'});// 其它_.iteratee('firstName');=> _.property('firstName');</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".keys">
            
                <span class="type-signature"><span class="icon green">static</span> </span>keys<span class="signature">(obj)</span><span class="type-signature"> &rarr; {Array|*}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line955">line 955</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        检索object拥有的所有可枚举属性的名称。
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">要检索的对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">Array</span>
|

<span class="param-type">*</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.keys({one: 1, two: 2, three: 3});=> ["one", "two", "three"]</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".lastDay">
            
                <span class="type-signature"><span class="icon green">static</span> </span>lastDay<span class="signature">(date)</span><span class="type-signature"> &rarr; {Date}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1055">line 1055</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        获取月份最后一天
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
                
<span class="param-type">Date</span>


            
            </td>

            

            

            <td class="description last">日期(默认当前日期)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">Date</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.dateFormat(_.lastDay());=>2019-05-31 00:00:00</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".ltrim">
            
                <span class="type-signature"><span class="icon green">static</span> </span>ltrim<span class="signature">(str, chars)</span><span class="type-signature"> &rarr; {string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line569">line 569</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        去左空格
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>str</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">字符串</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>chars</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">要移除的字符（默认为空白字符)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.ltrim(" Hello ")=>"Hello "_.ltrim("_Hello_","_")=>"Hello_"</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".matcher">
            
                <span class="type-signature"><span class="icon green">static</span> </span>matcher<span class="signature">(attrs)</span><span class="type-signature"></span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line183">line 183</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        返回一个断言函数，这个函数会给你一个断言可以用来辨别给定的对象是否匹配attrs指定键/值属性。
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>attrs</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var ready = _.matcher({selected: true, visible: true});var readyToGoList = _.filter(list, ready);</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".now">
            
                <span class="type-signature"><span class="icon green">static</span> </span>now<span class="signature">()</span><span class="type-signature"></span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line997">line 997</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        获取当前时间戳，兼容旧环境（毫秒）
    </div>
    

    

    

    

    

    

    

    

    

    

    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.now()=>521557891109615</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".numAdd">
            
                <span class="type-signature"><span class="icon green">static</span> </span>numAdd<span class="signature">(x, y)</span><span class="type-signature"> &rarr; {number}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1348">line 1348</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        加
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">第一个数值</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">第二个数组</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">number</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.numAdd('3',5);=>8</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".numCompare">
            
                <span class="type-signature"><span class="icon green">static</span> </span>numCompare<span class="signature">(x, y)</span><span class="type-signature"> &rarr; {number}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1487">line 1487</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        比较两数大小，x>y返回1，x==y返回0，否则返回-1
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">第一个数值</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">第二个数值</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">number</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.numCompare(3,5);=>-4-.numCompare('aaa',3);=>抛出异常Parameter is not a number!</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".numDivide">
            
                <span class="type-signature"><span class="icon green">static</span> </span>numDivide<span class="signature">(x, y)</span><span class="type-signature"> &rarr; {number}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1393">line 1393</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        除
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">第一个数值</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">第二个数值</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">number</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.numDivide(9,'3');=>3</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".numEqual">
            
                <span class="type-signature"><span class="icon green">static</span> </span>numEqual<span class="signature">(x, y)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1470">line 1470</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        判断两个小数数值是否相等
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">第一个数值</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">第二个数值</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.numEqual(0.1+0.2, 0.3);=>true</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".numMultiply">
            
                <span class="type-signature"><span class="icon green">static</span> </span>numMultiply<span class="signature">(x, y)</span><span class="type-signature"> &rarr; {number}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1378">line 1378</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        乘
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">第一个数值</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">第二个数值</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">number</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.numMultiply('2',3);=>6</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".numSubtract">
            
                <span class="type-signature"><span class="icon green">static</span> </span>numSubtract<span class="signature">(x, y)</span><span class="type-signature"> &rarr; {number}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1363">line 1363</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        减
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">第一个数值</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">第二个数值</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">number</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.numSubtract('7',5);=>2</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".poll">
            
                <span class="type-signature"><span class="icon green">static</span> </span>poll<span class="signature">(fn, callback, errback, timeout, interval)</span><span class="type-signature"></span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line401">line 401</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        轮询条件函数，根据状态执行相应回调
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">条件函数</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">成功回调</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>errback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">失败回调</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>timeout</code></td>
            

            <td class="type">
            
                
<span class="param-type">Integer</span>


            
            </td>

            

            

            <td class="description last">超时间隔(毫秒)</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>interval</code></td>
            

            <td class="type">
            
                
<span class="param-type">Integer</span>


            
            </td>

            

            

            <td class="description last">轮询间隔(毫秒)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>确保元素可见poll(   function () {      return document.getElementById('lightbox').offsetWidth > 0;   },   function () {      // Done, success callback   },   function () {     // Error, failure callback   });</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".range">
            
                <span class="type-signature"><span class="icon green">static</span> </span>range<span class="signature">(start, stop, step)</span><span class="type-signature"> &rarr; {Array.&lt;any>}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line929">line 929</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        一个用来创建整数灵活编号的列表的函数，便于each 和 map循环。<br>如果省略start则默认为 0；<br>step 默认为 1.返回一个从start 到stop的整数的列表，用step来增加 （或减少）独占。<br>值得注意的是，如果stop值在start前面（也就是stop值小于start值），那么值域会被认为是零长度，而不是负增长。-如果你要一个负数的值域 ，请使用负数step.
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>start</code></td>
            

            <td class="type">
            
                
<span class="param-type">Integer</span>


            
            </td>

            

            

            <td class="description last">开始位置</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>stop</code></td>
            

            <td class="type">
            
                
<span class="param-type">Integer</span>


            
            </td>

            

            

            <td class="description last">结束位置</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>step</code></td>
            

            <td class="type">
            
                
<span class="param-type">Integer</span>


            
            </td>

            

            

            <td class="description last">步长</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">Array.&lt;any></span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.range(10);=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]_.range(1, 11);=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]_.range(0, 30, 5);=> [0, 5, 10, 15, 20, 25]_.range(0, -10, -1);=> [0, -1, -2, -3, -4, -5, -6, -7, -8, -9]_.range(0);=> []</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".rtrim">
            
                <span class="type-signature"><span class="icon green">static</span> </span>rtrim<span class="signature">(str, chars)</span><span class="type-signature"> &rarr; {string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line584">line 584</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        去右空格
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>str</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">字符串</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>chars</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">要移除的字符（默认为空白字符)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.ltrim(" Hello ")=>" Hello"_.ltrim("_Hello_","_")=>"_Hello"</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".runOnce">
            
                <span class="type-signature"><span class="icon green">static</span> </span>runOnce<span class="signature">(fn, context)</span><span class="type-signature"> &rarr; {function}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line368">line 368</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        函数只执行一次
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">要执行的函数</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">上下文</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">function</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var a = 0;var canOnlyFireOnce = runOnce(function () {     a++;     console.log(a);});canOnlyFireOnce(); =>1canOnlyFireOnce(); => nothingcanOnlyFireOnce(); => nothing</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".serverTime">
            
                <span class="type-signature"><span class="icon green">static</span> </span>serverTime<span class="signature">()</span><span class="type-signature"> &rarr; {Date}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1009">line 1009</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        获取当前服务器时间(Date)
    </div>
    

    

    

    

    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">Date</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.serverTime()=>Wed May 15 2019 11:33:22 GMT+0800 (中国标准时间)</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".shortDateFormat">
            
                <span class="type-signature"><span class="icon green">static</span> </span>shortDateFormat<span class="signature">(date)</span><span class="type-signature"></span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1134">line 1134</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        返回日期的yyyy-MM-dd格式
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>date</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">日期</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.shortDateFormat(_.now());=>2019-05-15</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".shuffle">
            
                <span class="type-signature"><span class="icon green">static</span> </span>shuffle<span class="signature">(array)</span><span class="type-signature"> &rarr; {Array}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1223">line 1223</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        洗牌数组
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>array</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">要洗牌的数组</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">Array</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var a = [1,2,3,4,5]_.shuffle(a)=> [3, 2, 4, 5, 1]</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".some">
            
                <span class="type-signature"><span class="icon green">static</span> </span>some<span class="signature">(list, predicate, context)</span><span class="type-signature"> &rarr; {boolean}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line896">line 896</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        如果list中有任何一个元素通过 predicate 的真值检测就返回true。<br>一旦找到了符合条件的元素, 就直接中断对list的遍历。<br>predicate 通过 iteratee 进行转换，以简化速记语法。
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>list</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">要检查的列表</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>predicate</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">检测函数</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>context</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">上下文</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">boolean</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.some([null, 0, 'yes', false]);=> true</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".throttle">
            
                <span class="type-signature"><span class="icon green">static</span> </span>throttle<span class="signature">(fn, wait, scope)</span><span class="type-signature"> &rarr; {function}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line333">line 333</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        函数节流 每wait时间间隔，执行fn
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">要调用的函数</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>wait</code></td>
            

            <td class="type">
            
                
<span class="param-type">Integer</span>


            
            </td>

            

            

            <td class="description last">延迟时间，单位毫秒</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">scope代替fn里this的对象</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">function</span>





- 实际调用函数




            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var throttled = _.throttle(updatePosition, 100);$(window).scroll(throttled);</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".toFixed">
            
                <span class="type-signature"><span class="icon green">static</span> </span>toFixed<span class="signature">(x, digits)</span><span class="type-signature"> &rarr; {string|*}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1408">line 1408</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        固定小数位数
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">要处理的数值</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>digits</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">小数位置，默认保留2位</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>
|

<span class="param-type">*</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.toFixed(548.6512)=>548.65</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".toFixed">
            
                <span class="type-signature"><span class="icon green">static</span> </span>toFixed<span class="signature">(x)</span><span class="type-signature"> &rarr; {string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1442">line 1442</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        移除数值指数表示
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">要处理的数值</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var numbers = [            1.1234567890123456789e+30,            1.1234567890123456789e-30,            -1.1234567890123456789e+30,            -1.1234567890123456789e-30]var i;for (i=0;i&lt;numbers.length;i++) {       console.log(_.removeExponent(numbers[i]));  }=>1123456789012345700000000000000=>0.0000000000000000000000000000011234567890123458=>-1123456789012345700000000000000=>0.00000000000000000000000000000.11234567890123458</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".trim">
            
                <span class="type-signature"><span class="icon green">static</span> </span>trim<span class="signature">(str, chars)</span><span class="type-signature"> &rarr; {string}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line555">line 555</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        去左右空格
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>str</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">字符串</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>chars</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">要移除的字符（默认为空白字符)</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.trim(" Hello ")=>"Hello"_.trim("_Hello_","_")=>"Hello"</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".truncate">
            
                <span class="type-signature"><span class="icon green">static</span> </span>truncate<span class="signature">(str, limit, suffix)</span><span class="type-signature"> &rarr; {string|*}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line779">line 779</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        截取字符串
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>str</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">原始字符串</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>limit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Integer</span>


            
            </td>

            

            

            <td class="description last">长度限制(默认限制长度100)</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>suffix</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">超过替换字符（默认用'...'替代）</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">string</span>
|

<span class="param-type">*</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.truncate('We are doing JS string exercises.')=>We are doing JS string exercises._.truncate('We are doing JS string exercises.',19)=>We are doing JS ..._.truncate('We are doing JS string exercises.',15,'!!')=>We are doing !!</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".unformatTime">
            
                <span class="type-signature"><span class="icon green">static</span> </span>unformatTime<span class="signature">(string)</span><span class="type-signature"> &rarr; {number}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1173">line 1173</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        反格式化,与formatTime函数相反
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>string</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">要格式化的时间字符串</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">number</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>_.unformatTime('0:00:25');=> 25_.unformatTime('17:44:06');=> 63846</code></pre>

    

</dd>

            
                

<dt>
    
        <h4 class="name" id=".unique">
            
                <span class="type-signature"><span class="icon green">static</span> </span>unique<span class="signature">(arr)</span><span class="type-signature"> &rarr; {Array}</span>
                
            
            <div class="container-source members">
                <code><a href="jPublic.js.html">jPublic.js</a></code>,
                <code><a href="jPublic.js.html#line1267">line 1267</a></code>
            </div>
            
        </h4>

        
    
</dt>
<dd>

    
    <div class="description">
        数组去重
    </div>
    

    

    

    

    
    <div class="container-params">
        <h5>Parameters:</h5>
        
<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>arr</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">要去重的数组</td>
        </tr>

    
    </tbody>
</table>

    </div>
    

    

    

    

    

    

    
    <div class="container-returns">
        <h5>Returns:</h5>
        
                



<span class="param-type">Array</span>








            
    </div>
    

    


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


    
        <h5>Example</h5>
        
    <pre class="prettyprint"><code>var b = [1, 2, 3, 5, 5];_.unique(b);=> [1, 2, 3, 5]</code></pre>

    

</dd>

            </dl>
    

    

    
</article>

</section>




</div>

<footer>
    <img class="logo" src="favicon.ico" style="width: 30px; height: 30px">
    <div class="footer-text">jPublic工具文档</div>
</footer>
<script>prettyPrint();</script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/tui-doc.js"></script>
<script src="scripts/linenumber.js"></script>

    <script>
        var id = 'module:__sub'.replace(/"/g, '_');
        var selectedApi = document.getElementById(id); // do not use jquery selector
        var $selectedApi = $(selectedApi);

        $selectedApi.removeClass('hidden');
        $selectedApi.parent().find('.glyphicon').removeClass('glyphicon-plus').addClass('glyphicon-minus');
        showLnbApi();
    </script>

</body>
</html>